package com.javarush.test.level26.lesson15.big01.command;

import com.javarush.test.level26.lesson15.big01.ConsoleHelper;
import com.javarush.test.level26.lesson15.big01.exception.InterruptOperationException;

/**
 * Created by admin on 18.04.2015.
 */
class ExitCommand implements Command{
    @Override
    public void execute() throws InterruptOperationException
    {
        ConsoleHelper.writeMessage("Are you sure to quit? <y,n> :");
        String answer = ConsoleHelper.readString();
        if (answer.equalsIgnoreCase("Y")){
            ConsoleHelper.writeMessage("Thank you for using this system");
        }

    }
}
